package com.qhhc.entity;

import java.math.BigDecimal;
import java.util.Date;

public class CarTransaction {
    /**
     * 交易ID
     */
    private Long id;
    
    /**
     * 车辆ID
     */
    private Long carId;
    
    /**
     * 买家ID
     */
    private Long buyerId;
    
    /**
     * 经销商ID
     */
    private Long dealerId;
    
    /**
     * 交易日期
     */
    private Date transactionDate;
    
    /**
     * 成交价格
     */
    private BigDecimal price;
    
    /**
     * 支付方式
     */
    private String paymentMethod;
    
    /**
     * 支付状态：0未支付，1已支付，2已退款
     */
    private Integer paymentStatus;
    
    /**
     * 合同文件URL
     */
    private String contractUrl;
    
    /**
     * 交易状态：0进行中，1已完成，2已取消
     */
    private Integer status;
    
    /**
     * 创建时间
     */
    private Date createTime;
    
    /**
     * 更新时间
     */
    private Date updateTime;
    
    // 关联对象，用于查询展示
    private CarEn car;
    private SysUser buyer;
    private CarDealer dealer;

    public CarTransaction() {
    }

    public CarTransaction(Long id, Long carId, Long buyerId, Long dealerId, Date transactionDate, BigDecimal price, String paymentMethod, Integer paymentStatus, String contractUrl, Integer status, Date createTime, Date updateTime, CarEn car, SysUser buyer, CarDealer dealer) {
        this.id = id;
        this.carId = carId;
        this.buyerId = buyerId;
        this.dealerId = dealerId;
        this.transactionDate = transactionDate;
        this.price = price;
        this.paymentMethod = paymentMethod;
        this.paymentStatus = paymentStatus;
        this.contractUrl = contractUrl;
        this.status = status;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.car = car;
        this.buyer = buyer;
        this.dealer = dealer;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCarId() {
        return carId;
    }

    public void setCarId(Long carId) {
        this.carId = carId;
    }

    public Long getBuyerId() {
        return buyerId;
    }

    public void setBuyerId(Long buyerId) {
        this.buyerId = buyerId;
    }

    public Long getDealerId() {
        return dealerId;
    }

    public void setDealerId(Long dealerId) {
        this.dealerId = dealerId;
    }

    public Date getTransactionDate() {
        return transactionDate;
    }

    public void setTransactionDate(Date transactionDate) {
        this.transactionDate = transactionDate;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getPaymentMethod() {
        return paymentMethod;
    }

    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    public Integer getPaymentStatus() {
        return paymentStatus;
    }

    public void setPaymentStatus(Integer paymentStatus) {
        this.paymentStatus = paymentStatus;
    }

    public String getContractUrl() {
        return contractUrl;
    }

    public void setContractUrl(String contractUrl) {
        this.contractUrl = contractUrl;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public CarEn getCar() {
        return car;
    }

    public void setCar(CarEn car) {
        this.car = car;
    }

    public SysUser getBuyer() {
        return buyer;
    }

    public void setBuyer(SysUser buyer) {
        this.buyer = buyer;
    }

    public CarDealer getDealer() {
        return dealer;
    }

    public void setDealer(CarDealer dealer) {
        this.dealer = dealer;
    }

    @Override
    public String toString() {
        return "CarTransaction{" +
                "id=" + id +
                ", carId=" + carId +
                ", buyerId=" + buyerId +
                ", dealerId=" + dealerId +
                ", transactionDate=" + transactionDate +
                ", price=" + price +
                ", paymentMethod='" + paymentMethod + '\'' +
                ", paymentStatus=" + paymentStatus +
                ", contractUrl='" + contractUrl + '\'' +
                ", status=" + status +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", car=" + car +
                ", buyer=" + buyer +
                ", dealer=" + dealer +
                '}';
    }
}